package com.itheima.health.dao;

import com.itheima.health.pojo.OrderSetting;
import org.apache.ibatis.annotations.Mapper;

import java.util.Date;

import java.time.LocalDate;
import java.util.List;

/**
 * @author spt
 * @description 预约设置DAO
 * @date 2019/9/29
 **/
@Mapper
public interface OrderSettingDao {
    /**
     * excel文件上传
     * @param orderDate
     * @param number
     */
    void insertExcel(Date orderDate, int number);


    // 5 预约管理之当月预约信
    List<OrderSetting> findByDate(LocalDate monthFrist, LocalDate monthend);







    void editNumberByDate(Date orderDate, int number);

    void editNumberByDate(OrderSetting orderSetting);

    OrderSetting findCountByOrderDate(Date orderDate);

    void add(OrderSetting orderSetting);

    /**
     * 判断预约当天人数
     * @param subDate
     * @return
     */
    OrderSetting selectfull(Date subDate);

    /**
     * 提交预约后增加当天预约
     * @param subDate
     * @param resNew
     */
    void updateres(Date subDate, int resNew);

    /**
     * 查询预约人数
     * @param orderSetting
     * @return
     */
    OrderSetting select(OrderSetting orderSetting);
}
